package kr.hkit.powerjava.alone;

import javax.swing.JPanel;
import javax.swing.JLabel;
import javax.swing.JTextField;
import javax.swing.SwingConstants;

public class LabelAndTxt extends JPanel {
	private JLabel lblNewLabel;
	private JTextField textField;

	/**
	 * Create the panel.
	 */
	public LabelAndTxt(String txt) {

		initialize(txt);
	}
	private void initialize(String txt) {
		
		lblNewLabel = new JLabel(txt + " : ");
		lblNewLabel.setHorizontalAlignment(SwingConstants.CENTER);
		add(lblNewLabel);
		
		textField = new JTextField();
		textField.setHorizontalAlignment(SwingConstants.CENTER);
		add(textField);
		textField.setColumns(10);
	}
	public JTextField getTextField() {
		return textField;
	}
	public void setTextField(JTextField textField) {
		this.textField = textField;
	}

	
}
